package exercise4;
import javax.swing.JOptionPane;;
public class FeetAndMeters {
	public static double meter;
	public static double feet;
	public static double feetToMeter(double feet) {
		meter=0.305*feet;
		return meter;
	}
	public static double meterToFeet(double meter) {
		feet=meter/0.305;
		return feet;
	}
	public static void printFeetAndMeters(){
		StringBuilder str=new StringBuilder();
		str.append("Feet\t\tMeter\t|\tMeter\t\tFeet");
		str.append("\n");
		str.append("--------------------------------------------------------------------");
		str.append("\n");
		for(int i=1;i<=10;i++) {
			double k=15.0+5.0*i;
			double a=1.0*i;
			double b=feetToMeter(a);
			double c=meterToFeet(k);
			str.append(a+"         "+b+"    |    "+k+"        "+c);
			str.append("\n");
		}
		JOptionPane.showMessageDialog(null,str.toString());
	}
}
